/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-04-10
 * Time: 8:01
 */
class MyBlockingQueue{
    public String[] elem;
    public int head;
    public int tail;
    public int size;
    public MyBlockingQueue(int capacity){
      this.elem=new String[capacity];
    }
    public void put(String value){
        if(size>=elem.length){
            //队列满了.阻塞
            return;
        }
        elem[tail]=value;
        tail++;
        size++;
        if(tail>= elem.length){
            tail=0;
        }



    }

}
public class Demo3 {
    public static void main(String[] args) {
        MyBlockingQueue queue=new MyBlockingQueue(1000);
        System.out.println(queue);

    }
}
